import request from '@/utils/request'
import axios from 'axios'
import { getToken } from "@/utils/auth";

export function uploadPostFile(url, params) {
  console.log('url======', url);
  // return axios({
  //   url: url,
  //   method: 'post',
  //   data: params,
  //   // timeout: 10000,
  //   headers: {
  //     'Content-Type': 'multipart/form-data',
  //     'Authorization': "Bearer " + getToken()
  //   }
  // });
  return request({
    url: url,
    method: 'post',
    data: params,
    timeout: 300000,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}